import inspect
import sys,os,time,json
p=os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
p=os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(p))))
p=p+os.sep+'_base_tool'+os.sep+'python'
sys.path.append(p)
from base_class1_0 import base_class # type: ignore

class a_1_0_6_2_0(base_class):
    def run(self,**kwargs): 
        file_path=kwargs.get("file_path")
        encoding=kwargs.get("encoding")
        try:
            with open(file_path,"r",encoding=encoding)  as f:
                data=f.read()
            return {"data":data}
        except Exception as e:
            return {"type":"error","msg":"读取文件错误:"+str(e)+str(kwargs)}
    